package qlsl.androiddesign.adapter.subadapter;

import java.util.List;

import com.qlsl.androiddesign.kuaiwa.R;

import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import qlsl.androiddesign.activity.baseactivity.BaseActivity;
import qlsl.androiddesign.adapter.baseadapter.BaseAdapter;
import qlsl.androiddesign.entity.otherentity.RecruitList;
import qlsl.androiddesign.entity.otherentity.ThreeCategory;
import qlsl.androiddesign.util.commonutil.ImageUtils;

public class CruitListAdapter extends BaseAdapter<RecruitList> {

	public CruitListAdapter(BaseActivity activity, List<RecruitList> list) {
		super(activity, list);
	}

	public View getView(int position, View convertView, ViewGroup parent) {
		convertView = getItemView(convertView,
				R.layout.listitem_shopping_category);

		TextView tv_text = getView(convertView,
				R.id.vehicle_fragment_item_title);
		ImageView iv_icon = getView(convertView, R.id.vehicle_fragment_item_img);

		RecruitList item = getItem(position);
		// ImageUtils.rect(activity, item.getPhoto(), iv_icon);
		tv_text.setText(item.getName());
		iv_icon.setImageResource(item.getDrawable());

		return convertView;
	}
}
